package dummy.randomsim
import mars.ns.core.Node
import mars.ns.core.Network
import mars.ns.RoundSimulation
import mars.ns.visualisation.VisualisationListener
import mars.ns.selectors.RandomSelection
import mars.ns.statechangers.ConnectedStateChange

/**
 * Generates a graph using a round based Simulation.
 */
object RoundSim extends Application {
    var nodes : List[Node] = Nil
    for(i<- 0 until 100)
        nodes = new Node::nodes
    val net:Network[Node] = new Network
    net.addNodes(nodes)
    
    val sim:RoundSimulation[Node] = new RoundSimulation(net,10) with RandomSelection[Node] with ConnectedStateChange[Node]
    sim.subscribe(new VisualisationListener[Node](net))
	sim.run
}